<?php

namespace app\model;

use think\Model;

/**
 * 个人资料
 *
 * @author yyzh
 *        
 */
class MyBriefing extends Model {
	protected $table = 'my_briefing';
	protected $pk = 'id';
	protected $field = array (
			'id',
			'name',
			'occupation',
			'birthday',
			'phone',
			'email',
			'address',
			'site',
			'briefing',
			'img' 
	);
	/**
	 * 获取最新的一条个人信息
	 *
	 * @return \app\model\MyBriefing
	 */
	public static function getNew() {
		return self::get ( function ($query) {
			$query->order ( 'id', 'DESC' );
		}, [ ], true );
	}
}